#include <buola/gui.h>

#include <buola/app/cplugin.h>
#include <buola/widgets/ctheme.h>

namespace buola { namespace gui {

CTheme::CTheme()
{
}

CTheme::~CTheme()
{
}

void CTheme::LoadTheme(const std::wstring &pTheme)
{
    std::string lString("libbuolatheme_");
    lString+=utf8(pTheme);
	CPlugin::Load(lString);
}

static CTheme *sTheme=nullptr;

void set_default_theme(CTheme *pTheme)
{
    sTheme=pTheme;
}

CTheme *get_default_theme()
{
    if(!sTheme)
    {
        CTheme::LoadTheme(L"liquid");
    }

    return sTheme;
}

/*namespace gui*/ } /*namespace buola*/ }
